package com.epam.traning.taskmanager.content;

import java.util.List;

import com.epam.traning.taskmanager.content.bo.Task;
import com.epam.traning.taskmanager.task.ListTaskTask;
import com.epam.traning.taskmanager.task.common.ParamCallback;

public class ContentManager {

	private static ContentManager instance;
	
	public static final String TASKS_URL = "https://dl.dropbox.com/u/16403954/tasks.json";
	
	private ContentManager() {
		
	}
	
	public static ContentManager getInstance() {
		if (instance == null) {
			instance = new ContentManager();
		}
		return instance;
	}
	
	public void getTasks(final ParamCallback<List<Task>> paramCallback) {
		new ListTaskTask(paramCallback).start(TASKS_URL);
	}

}
